package com.cskaoyan._01encapsulate._02ex;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/8 10:13
 **/
/*
定义一个员工Employer类,
类中有3个属性: 姓名 , 年龄 , 工资, 提供一个打印基本信息的public的方法


 */
public class Demo {
    public static void main(String[] args) {
        //Employer employer = new Employer("zs", 20, 10000.0);
        //System.out.println("employer.name = " + employer.name);
        //employer.printInfo();

        //Employer employer = new Employer();
        //employer.name = "zs";
        //employer.setSalary(12000);
        //employer.setAge(20);
        //employer.printInfo();



        //Employer employer2 = new Employer();
        //employer2.name = "zs";
        //employer2.setSalary(18000);
        //employer2.setAge(200);
        //employer2.printInfo();


        Employer2 employer = new Employer2("zs",200,20000);
        employer.name = "zs";
        employer.printInfo();

    }
}
